﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NP.BPMReportPlatform.Leave.Dto
{
    /// <summary>
    /// 请休假Dto
    /// </summary>
    public class LeaveDto
    {
        /// <summary>
        /// 数据输入
        /// </summary>
        public class LeaveInputDto
        {
            /// <summary>
            /// 工号
            /// </summary>
            public string WorkNumber { get; set; }

            /// <summary>
            /// 请假类型
            /// </summary>
            public string LeaveType { get; set; }

            /// <summary>
            /// 明细
            /// </summary>
            public List<LeaveDetailDto> Dataset1 { get; set; }
        }

        /// <summary>
        /// 请假明细
        /// </summary>
        public class LeaveDetailDto
        {
            /// <summary>
            /// 序号
            /// </summary>
            public string KeyIndex { get; set; }

            /// <summary>
            /// 请假类型
            /// </summary>
            public string LeaveTypeName { get; set; }

            /// <summary>
            /// 开始日期
            /// </summary>
            public string StartDate { get; set; }

            /// <summary>
            /// 结束时间
            /// </summary>
            public string StartTime { get; set; }

            /// <summary>
            /// 结束日期
            /// </summary>
            public string EndDate { get; set; }

            /// <summary>
            /// 结束时间
            /// </summary>
            public string EndTime { get; set; }
        }

        /// <summary>
        /// 请假推送接口
        /// </summary>
        public class LeavePushRequestDto
        {
            /// <summary>
            /// 推送数据
            /// </summary>
            public LeavePushData ZOA_HR_ABSENCE_CREATE { get; set; }
        }

        /// <summary>
        /// 请假推送数据
        /// </summary>
        public class LeavePushData
        {
            /// <summary>
            /// 请假类型
            /// </summary>
            public string ABSENCETYPE { get; set; }

            /// <summary>
            /// 员工工号
            /// </summary>
            public string EMPLOYEENUMBER { get; set; }

            /// <summary>
            /// NOTESID
            /// </summary>
            public string NOTESID { get; set; } = string.Empty;

            /// <summary>
            /// 明细
            /// </summary>
            public OA_HR_ABSENCE OA_HR_ABSENCE { get; set; }

            /// <summary>
            /// X表示校验调试，空表示直接调用
            /// </summary>
            public string SIMULATE { get; set; }
        }

        public class OA_HR_ABSENCE
        {
            public List<OA_HR_ABSENCEData> item { get; set; }
        }

        /// <summary>
        /// 明细行
        /// </summary>
        public class OA_HR_ABSENCEData
        {
            /// <summary>
            /// 开始日期
            /// </summary>
            public string VALIDITYBEGIN { get; set; }

            /// <summary>
            /// 开始时间
            /// </summary>
            public string VALIDITYEND { get; set; }

            /// <summary>
            /// 结束日期
            /// </summary>
            public string START { get; set; }

            /// <summary>
            /// 结束时间
            /// </summary>
            public string END { get; set; }

            public string ABSENCEHOURS { get; set; } = string.Empty;
            public string MESSAGE { get; set; } = string.Empty;
            public string HRDOCNR { get; set; } = string.Empty;
        }

        /// <summary>
        /// 请假推送结果
        /// </summary>
        public class LeavePushResponse
        {
            /// <summary>
            /// 推送返回数据
            /// </summary>
            public CREATEResponse ZOA_HR_ABSENCE_CREATEResponse { get; set; }
        }

        /// <summary>
        /// 返回结果
        /// </summary>
        public class CREATEResponse
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string ERR_MSG { get; set; }

            /// <summary>
            /// X代表成功，其他失败
            /// </summary>
            public string FLAG { get; set; }

            /// <summary>
            /// 回调实体
            /// </summary>
            public OA_HR_ABSENCE OA_HR_ABSENCE { get; set; }
        }

        /// <summary>
        /// 休假信息查询结果
        /// </summary>
        public class LeaveQueryResponse
        {
            /// <summary>
            /// 数据实体
            /// </summary>
            public ZOA_HR_ABSENCE_LISTResponse ZOA_HR_ABSENCE_LISTResponse { get; set; }
        }

        /// <summary>
        /// 休假信息查询结果
        /// </summary>
        public class ZOA_HR_ABSENCE_LISTResponse
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string ERR_MSG { get; set; }

            /// <summary>
            /// X代表成功，其他失败
            /// </summary>
            public string FLAG { get; set; }

            public OA_HR_AB_LIST OA_HR_AB_LIST { get; set; }
        }

        /// <summary>
        /// 数据集合
        /// </summary>
        public class OA_HR_AB_LIST
        {
            public List<OA_HR_AB_LISTData> item { get; set; }
        }

        /// <summary>
        /// 数据集合
        /// </summary>
        public class OA_HR_AB_LISTData
        {
            /// <summary>
            /// 出勤或缺勤类型
            /// </summary>
            public string AWART { get; set; }

            /// <summary>
            /// 缺勤/出勤类型文本
            /// </summary>
            public string ATEXT { get; set; }

            /// <summary>
            /// 开始日期
            /// </summary>
            public string BEGDA { get; set; }

            /// <summary>
            /// 结束日期
            /// </summary>
            public string ENDDA { get; set; }

            /// <summary>
            /// 开始时间
            /// </summary>
            public string BEGUZ { get; set; }

            /// <summary>
            /// 结束时间
            /// </summary>
            public string ENDUZ { get; set; }

            /// <summary>
            /// 休假小时数
            /// </summary>
            public string ABRST { get; set; }

            /// <summary>
            /// 时间数据的凭证编号
            /// </summary>
            public string DOCNR { get; set; }
        }

        /// <summary>
        /// 定额假期信息查询结果
        /// </summary>
        public class LeaveFixedHourQueryResponse
        {
            /// <summary>
            /// 数据实体
            /// </summary>
            public ZOA_HR_FIXEDHOUR_GETResponse ZOA_HR_FIXEDHOUR_GETResponse { get; set; }
        }

        /// <summary>
        /// 休假信息查询结果
        /// </summary>
        public class ZOA_HR_FIXEDHOUR_GETResponse
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string ERR_MSG { get; set; }

            /// <summary>
            /// X代表成功，其他失败
            /// </summary>
            public string FLAG { get; set; }

            /// <summary>
            /// 集合
            /// </summary>
            public OA_HR_FIX_LIST OA_HR_FIX_LIST { get; set; }
        }

        public class OA_HR_FIX_LIST
        {
            public List<OA_HR_FIX_LISTData> item { get; set; }
        }

        /// <summary>
        /// 数据集合
        /// </summary>
        public class OA_HR_FIX_LISTData
        {
            /// <summary>
            /// 缺勤定额类型编码
            /// </summary>
            public string KTART { get; set; }

            /// <summary>
            /// 缺勤定额类型描述
            /// </summary>
            public string KTEXT { get; set; }

            /// <summary>
            /// 定额扣减的起始日期
            /// </summary>
            public string DESTA { get; set; }

            /// <summary>
            /// 定额扣减到
            /// </summary>
            public string DEEND { get; set; }

            /// <summary>
            /// 定额的数量
            /// </summary>
            public string ANZHL { get; set; }

            /// <summary>
            /// 使用的数量
            /// </summary>
            public string KVERB { get; set; }

            /// <summary>
            /// 剩余的数量
            /// </summary>
            public string LOVER { get; set; }
        }

        public class CancelLeavePushRequest
        {
            public List<CONTROLLERItem> item { get; set; } = new List<CONTROLLERItem>();
        }

        public class CONTROLLERItem
        {
            public string FIELD { get; set; } = string.Empty;

            public string VALUE { get; set; } = string.Empty;
        }

        /// <summary>
        /// 销假推送结果
        /// </summary>
        public class LeaveCancelPushResponse
        {
            /// <summary>
            /// 推送返回数据
            /// </summary>
            public LeaveCancelResponse ZHR_ABSENCE_DELEResponse { get; set; }
        }

        public class LeaveCancelResponse
        {
            public LeaveCancelOUTPUT OUTPUT { get; set; }
        }

        public class LeaveCancelOUTPUT
        {
            public ZMT_ABSENCE_RESP ZMT_ABSENCE_RESP { get; set; }
        }

        public class ZMT_ABSENCE_RESP
        {
            public string ERR_MSG { get; set; }

            /// <summary>
            /// S代表成功，其他失败
            /// </summary>
            public string FLAG { get; set; }
        }
    }
}
